<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %> 
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys" %>
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>授信使用情况列表</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<!-- 是否显示提交按钮 -->
<sys:funcAuth resCd="SplSubmit">
	<span id="isShowCmtBtn" />
</sys:funcAuth>
<!-- 是否显示审核按钮 -->
<sys:funcAuth resCd="SplCheck">
	<span id="isShowAudBtn" />
</sys:funcAuth>
<script type="text/javascript">
	var grid = null;
	var _mfrId;
	var _limId;
	$(function () {
		_mfrId = '${mfrId}';
		_limId = '${limId}';
		var _url = '<%=path%>/product/splCrLim/initPrjSplCrLimList.do?limId=' + _limId ;
	    $("#ligergrid1").ligerGrid({
	    	url: _url,
	    	method : 'get',
	        columns: [
	            { display: '支付表号',name:'paySchNo', align:'center', width: 200},
	            { display: '额度变化类型', name: 'limTypCdNm', align:'center', width: 150 },
	            { display: '额度', name: 'limOpAmt', align:'center', width: 150 },
	            { display: '创建时间', name: 'crtTm', align:'center', width: 150 ,render:renderDate}
	            
	        ],
	        pageSize:10,
	        root:'rows',
	        record:'total',
	        hideLoadButton : true,
	        width: '100%',
	        height:'100%',
	        heightDiff:-2,
	        checkbox:false,
	        rownumbers:true
	    });
	    grid = liger.get("ligergrid1");
	    grid.setHeight(100);
	    $("#searchBar").ligerForm();
	
	    $("#searchBtn").click(function(event) {
	         var form = new liger.get("searchBar");
	         var data = form.getData();
	         for (name in data){
	            grid.setParm(name,data[name]);
	         };
	        grid.reload();
	    });
	    $("#clearBtn").click(function(event) {
	        $("#resetBtn").click();  //重置 input-text
	        var form = liger.get("searchBar");
	        form.setData({  //重置select等特殊表单
	            "brCd": " ",
	            "audStsCd": " ",
	            "buOrgCd": " "
	        });
	    });
	});
	
	 //新增数据
	var callback = function () {
		grid.reload();
    };
  //格式化时间
	function renderDate(rowdata, index, value){
		var dateStr = "";
		if(null != value){
			var date = new Date(value);
			dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
		}
		return dateStr;
	}
</script>

<body class="iframeBody">
<div class="Wrapper">
<div class="searchArea">
    <form id="searchBar">
        
    </form>
    </div>
</div>
<div id="ligergrid1" class="sq-grid"></div>


</body>
</html>